package com.dnjn.happiness.survey.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dnjn.happiness.survey.api.model.StatisticalAnalysisModel;
import com.dnjn.happiness.survey.domain.Survey;
import com.dnjn.happiness.survey.domain.SurveyRecord;
import com.dnjn.happiness.survey.domain.vo.StatisticalAnalysisAppriseVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 问卷 Mapper 接口
 * </p>
 *
 * @author Amber
 * @since 2023-10-04
 */
public interface SurveyMapper extends BaseMapper<Survey> {

    Page<Survey> selectPageSurvey(@Param("dto") Survey domain, Page page);

    Page<Survey> selectPageSurvey1(@Param("dto") Survey domain, Page page);


    void issuedSurveyId(@Param("surveyId") Long surveyId);

    void endSurveyId(@Param("surveyId") Long surveyId);

    Page<SurveyRecord> selectSurveyRecordByUserId(@Param("userId") Long userId, Page page);

    List<StatisticalAnalysisModel> selectStatisticalAnalysisSurvryList(@Param("vo") StatisticalAnalysisAppriseVO vo);

    List<Survey> querySvrveyAllByUserId(Long userId);
}
